{extend name="Public/base"/}
{block name="style"}
<style type="text/css">.sent-margin{padding:50px;}</style>
{php}
$meta_title = "恭喜您!";
{/php}
{/block}
{block name="body"}
<div class="main-box clearfix">
	<header class="main-box-header clearfix">
		<h2>
			<i class="fa fa-send"></i>
			恭喜您!
		</h2>
	</header>
	<div class="main-box-body clearfix">
		<p class="success">
			<?php echo($message); ?></p>
		<p class="detail"></p>
		<p class="jump"> <b id="wait"><?php echo($waitSecond); ?></b>
			秒后页面将自动跳转
		</p>
		<div>
			<a id="href" class="btn btn-primary" id="btn-now" href="<?php echo($jumpUrl); ?>">立即跳转</a>
			<button id="btn-stop" class="btn btn-default" type="button" onclick="stop()">停止跳转</button>
		</div>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
(function(){
 var wait = document.getElementById('wait'),href = document.getElementById('href').href;
 var interval = setInterval(function(){
        var time = --wait.innerHTML;
        if(time <= 0) {
            location.href = href;
            clearInterval(interval);
        };
     }, 1000);
  window.stop = function (){
         console.log(111);
            clearInterval(interval);
 }
 })();
</script>
{/block}